package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformsynctask.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 跨境电商数据同步任务分页 Request VO")
@Data
public class PlatformSyncTaskPageReqVO extends PageParam {

    @Schema(description = "平台编号", example = "484")
    private Long platformId;

    @Schema(description = "店铺编号", example = "22521")
    private Long storeId;

    @Schema(description = "同步类型", example = "1")
    private String syncType;

    @Schema(description = "同步方向（1上传到平台 2从平台下载 3双向同步）")
    private Integer syncDirection;

    @Schema(description = "业务类型", example = "2")
    private String businessType;

    @Schema(description = "业务数据ID", example = "6104")
    private Long businessId;

    @Schema(description = "批次号")
    private String batchNo;

    @Schema(description = "优先级（1-10，数字越小优先级越高）")
    private Integer priority;

    @Schema(description = "计划执行时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] scheduledTime;

    @Schema(description = "开始执行时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] startTime;

    @Schema(description = "结束执行时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] endTime;

    @Schema(description = "任务状态（0待执行 1执行中 2执行成功 3执行失败 4已取消）", example = "2")
    private Integer status;

    @Schema(description = "执行进度（0-100）")
    private Integer progress;

    @Schema(description = "总数量", example = "18091")
    private Integer totalCount;

    @Schema(description = "成功数量", example = "789")
    private Integer successCount;

    @Schema(description = "失败数量", example = "19338")
    private Integer failedCount;

    @Schema(description = "错误信息")
    private String errorMsg;

    @Schema(description = "请求数据JSON")
    private String requestData;

    @Schema(description = "响应数据JSON")
    private String responseData;

    @Schema(description = "重试次数", example = "27686")
    private Integer retryCount;

    @Schema(description = "最大重试次数", example = "17343")
    private Integer maxRetryCount;

    @Schema(description = "下次重试时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] nextRetryTime;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

}